package com.uqbar.asteroids.components;

import com.uqbar.asteroids.scenes.AsteroidScene;
import com.uqbar.vainilla.GameComponent;

public class CircleShoot extends GameComponent<AsteroidScene>{
	
	protected int radio;
	protected int velocidad;
	protected double i;
	protected double j;
	protected double posicionInicialx;
	protected double posicionInicialy;
	protected int dmg;
	protected int grupo;
	protected boolean active;
	

	public boolean isActive() {
		return active;
	}


	public void setActive(boolean outScreen) {
		this.active = outScreen;
	}


	public int getGrupo() {
		return grupo;
	}


	public void setGrupo(int grupo) {
		this.grupo = grupo;
	}


	public CircleShoot(int radio, int velocidad, double posIniX, double posIniY){
		this.radio = radio;
		this.velocidad = velocidad;
		this.posicionInicialx = posIniX;
		this.posicionInicialy = posIniY;
		this.setX(posIniX);
		this.setY(posIniY);
		this.setActive(true);
	}
	
	public boolean outofScreen(){
		 return (this.getX() > this.getGame().getDisplayWidth() || this.getX() < 0 || this.getY() > this.getGame().getDisplayHeight() || this.getY()+this.radio * 2< 0 );
	}


	public void toOutScreen() {
		this.setX(-8);
		this.setGrupo(2);
		this.setActive(false);
	}


	public void activar() {
		this.active = true;
		
	}
	
	
	
	
	
}
